fix(events): suppress selection on click-intent presses (B8 / #61)#87
Merged
Conversation
Co-Authored-By: Mark <psyhik17@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Mark <psyhik17@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Mark <psyhik17@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Mark <psyhik17@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Mark <psyhik17@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #61.
Summary
Press intent classified up front into
gesture-confirmed | gesture-tentative | click | select. Theclickintent (no capture, hit chain hasonClick, no force-select modifier) skipsstartSelectionAND multi-click escalation, then firesonClickAton release viaApp.pressIntentClick. Force-select modifier (Shift/Alt) demotes click → select so consumers can still highlight text inside a clickable region (Button label, link anchor text). Confirmed/tentative gestures still take precedence —captureGesturealways wins.Pre-fix: a press over any Box with
onClickstarted a selection drag; accidental motion between press and release escalated into a selection, eating the click.Commits
feat(events): add computePressIntent helper— pure helper + truth-table testsfeat(events): dispatchMouseDown reports clickable— single tree walk, both signalsfix(events): suppress selection on click-intent presses— wire intent + flag lifecycletest(events): integration tests for click-intent— B8 repro + counter-cases + Shift/Alt + multi-click + gesture prioritydocs: note press intent classificationTest plan
pnpm typecheckcleanpnpm lintcleanpnpm buildcleanpnpm test— 760 passed (was 748; +12 integration + 12 truth-table − 0 regressions)